package com.example.aop;

import com.example.aop.controller.Iface;
import com.example.aop.controller.TestController;
import com.example.aop.controller.TestController3;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class SAopApplication {

    public static void main(String[] args) {
        ApplicationContext context =  SpringApplication.run(SAopApplication.class, args);

        TestController bean = context.getBean(TestController.class);
        System.out.println(bean);

        Iface iface = (Iface) context.getBean("testController2");
        System.out.println(iface);

        TestController3 bean3 = context.getBean(TestController3.class);
        System.out.println(bean3);

    }

}
